package cn.sdormitory.knowledgebase.pojo;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;


/**
 * @author yy
 */

@Data
@TableName(value ="study_skills")
public class StudySkills {

    @TableId(value="id")
    @ApiModelProperty(value="主键")
    private Integer id;

    @TableField(value="title")
    @ApiModelProperty(value="技能标题")
    private String title;

    @TableField(value="img")
    @ApiModelProperty(value="技能封面图")
    private String img;

    @TableField(value="content")
    @ApiModelProperty(value="技能内容")
    private String content;

    @TableField(value="video")
    @ApiModelProperty(value="技能视频")
    private String video;

    @TableField(value="type")
    @ApiModelProperty(value="技能类型")
    private Integer type;

    @TableField(value="exam_num")
    @ApiModelProperty(value="考试题数")
    private Integer examNum;

    @TableField(value="cycle")
    @ApiModelProperty(value="周期学习(0:否 1:是)")
    private Boolean cycle;

    @TableField(value="must_learn")
    @ApiModelProperty(value="是否必学(0:否 1:是)")
    private Boolean mustLearn;

    @TableField(value="status")
    @ApiModelProperty(value="状态(0:下架 1:上架)")
    private Boolean status;

    @TableField(value="create_time")
    @ApiModelProperty(value="创建时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(value="modify_time")
    @ApiModelProperty(value="修改时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifyTime;

}
